{extend name="public/base"}{/extend}
{block name="nav"}
    <header class="top header-v4 desktops-section default-top"><!-- top-bar --><!-- top-bar --><!-- S top-main -->
        <div class="top-main">
            <div class="page-width clearfix">
                <div class="logo" skinobjectzone="HtmlLogo_412"><a href="/"><img src="/static/home/images/logo.png"
                                                                                 alt="高端响应式自适应五金机电工程机械设备类企业网站模板 PHP源码 "></a>
                </div>
                <!-- end of logo -->
                <div class="top-main-content clearfix"><!-- S nav -->
                    <nav class="nav">
                        <div class="main-nav clearfix" skinobjectzone="menu_481">
                            <ul class="sf-menu sf-js-enabled">
                                {volist name="nav" id="vo"}
                                <li class="active">
                                    <a class="first-level sf-with-ul" href="{$vo.url}" target="" data-nav-title="{$vo.name}">
                                        <strong>{$vo.name}</strong>
                                        <span class="sf-sub-indicator"> »</span>
                                    </a><i></i>
                                    {notempty name="vo.childrens"}
                                    <ul class="" style="display: none; visibility: hidden;">
                                        {volist name="vo.childrens" id="v"}
                                        <li class="">
                                            <a class="" href="{$v.url}" target="">
                                                <strong>{$v.name}</strong>
                                            </a>
                                        </li>
                                        {/volist}
                                    </ul>
                                    {/notempty}
                                </li>
                                {/volist}
                            </ul>
                        </div>
                    </nav>
                    <!-- E nav--></div>
                <!-- S language -->
                <div class="language" skinobjectzone="HtmlLanguage_1292"></div>
                <!-- E language --></div>
        </div>
        <!-- E top-main --></header>
    <!-- S touch-top-wrapper -->
    <div class="touch-top mobile-section clearfix">
        <div class="touch-top-wrapper clearfix">
            <div class="touch-logo" skinobjectzone="HtmlLogo_1491"><a class="" href="/"><img
                    src="/static/home/images/logo.png" alt="高端响应式自适应五金机电工程机械设备类企业网站模板 PHP源码 "></a></div>
            <!-- S touch-navigation -->
            <div class="touch-navigation">
                <div class="touch-toggle">
                    <ul>
                        <li class="touch-toggle-item-last"><a href="javascript:;" class="drawer-menu"
                                                              data-drawer="drawer-section-menu"><i
                                class="touch-icon-menu"></i><span>导航</span></a></li>
                    </ul>
                </div>
            </div>
            <!-- E touch-navigation --></div>
        <!-- S touch-top -->
        <div class="touch-toggle-content touch-top-home">
            <div class="drawer-section drawer-section-language"></div>
            <div class="drawer-section drawer-section-menu">
                <div class="touch-menu" skinobjectzone="menu_1968">
                    <ul>
                        {volist name="nav" id="vo"}
                        <li class="">
                            <a class="first-level sf-with-ul" href="{$vo.url}" target="">
                                <span>{$vo.name}</span><i class="touch-arrow-down"></i>
                            </a>
                            {notempty name="vo.childrens"}
                            <ul class="" style="display: none; visibility: hidden;">
                                {volist name="vo.childrens" id="v"}
                                <li class="">
                                    <a class="" href="{$v.url}" target="">
                                        <span>{$v.name}</span>
                                    </a>
                                </li>
                                {/volist}
                            </ul>
                            {/notempty}
                        </li>
                        {/volist}
                    </ul>
                </div>
            </div>
            <script type="text/javascript">
                $(document).ready(function () {

                    $(".touch-toggle a").click(function (event) {
                        var className = $(this).attr("data-drawer");

                        if ($("." + className).css('display') == 'none') {
                            $("." + className).slideDown().siblings(".drawer-section").slideUp();
                        } else {
                            $(".drawer-section").slideUp();
                        }
                        event.stopPropagation();
                    });

                    /*$(document).click(function(){
                     $(".drawer-section").slideUp();
                     })*/

                    $('.touch-menu a').click(function () {
                        if ($(this).next().is('ul')) {
                            if ($(this).next('ul').css('display') == 'none') {
                                $(this).next('ul').slideDown();
                                $(this).find('i').attr("class", "touch-arrow-up");
                            } else {
                                $(this).next('ul').slideUp();
                                $(this).next('ul').find('ul').slideUp();
                                $(this).find('i').attr("class", "touch-arrow-down");
                            }
                        }
                    });

                    $(".sf-menu a").each(function (i, d) {
                        console.log($(this).attr('href'));
                        var active = '{$active}';
                        if (active == $(this).data('nav-title')) {
                            $(this).parents('.active').addClass('current');
                        }
                    });
                });
            </script>
        </div>
        <!-- E touch-top --></div>
{/block}